//
//  aboutViewController.m
//  dddddemo
//
//  Created by lanou3g on 15/11/7.
//  Copyright © 2015年 zhk. All rights reserved.
//

#import "aboutViewController.h"
#import "BackGroundMusicPlayer.h"
@interface aboutViewController ()

@property(nonatomic,strong)UILabel * la;
@property(nonatomic,strong)BackGroundMusicPlayer * bgm;

@end

@implementation aboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithRed:255/255.0 green:106/255.0 blue:106/255.0 alpha:1.0];
    self.la = [[UILabel alloc]initWithFrame:CGRectMake(50, 130, CGRectGetWidth(self.view.frame) - 100, 340)];
    self.la.text = @"尽管在配色上做了很多调整，依然没能把界面间的颜色做的好看。    关于保存事件的说明：没有标题或者内容（其中之一）是不能进行保存的，照片最多可以添加三张，录音只能存一条，将会继续改进。   另外第一次进入记事界面输入会略有卡顿。 感谢您的使用! bgm：I'm yours。 ";
    self.la.textAlignment = NSTextAlignmentCenter;
    self.la.numberOfLines = 0;
    [self.view addSubview:self.la];
    self.bgm = [BackGroundMusicPlayer shareBackGroundMusicPlayer:@"I.mp3"];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"暂停/播放" style:(UIBarButtonItemStyleDone) target:self action:@selector(rightAction)];
}

- (void)rightAction
{
    if (self.bgm.player.playing == YES) {
        [self.bgm pause];
    }else
    {
        [self.bgm play];
    }
}



- (void)viewWillAppear:(BOOL)animated {
    
    [self.bgm play];
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
